const logger = (createState) => {
  return (set, get, api) => {
    return createState((...args) => {
      console.log('logger', 'before', args, get());
      set(...args);
      console.log('logger', 'after', args, get());
    }, get, api);
  };
};

export default logger;
